<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<TITLE>文件上传管理器</TITLE>

</head>
<body>

<div>
<form enctype="multipart/form-data" name="fm" method="POST">
<input type="hidden" name="action" value="upload" />
<input type="hidden" name="path" value="<{$path}>" />
<input type="file" name="user_file" />
<input type="checkbox" name="unzip" value="true" />zip文件自动解压缩
<input type="submit" name="sub" value="上传" />
</form>
</div>
<div style=" margin-top:20px;">
<form name="md" method="POST" onsubmit="if(this.dir.value.match(/[^0-9a-z_-]/i)){alert('目录名含有非法字符，请仅使用字母、数字或下划线');return false}return true;">
<input type="hidden" name="action" value="mkdir" />
<input type="hidden" name="path" value="<{$path}>" />
<input type="text" name="dir" />
<input type="submit" name="sub" value="创建目录" />
</form>
</div>

<div>

<form name="li" method="POST" onsubmit="return confirm('是否删除所选文件和目录？');">
<input type="hidden" name="action" value="del" />
<input type="hidden" name="path" value="<{$path}>" />
<ul>
<li>
<{$file_nav}>
</li>
<{foreach from=$dirs item=item}>
<li>
<input type="checkbox" name="dirpath[]" value="<{$item.path_dirs}>" /> 
<img src="http://cms.wondershare.com/images/file/folder.gif"  style="margin-right:10px;"/>
<a href="?path=<{$item.path_dirs}>&web_type=<{$web_type}>">
<{$item.dirs}>
</a>
</li>


<{/foreach}>
</ul>

<{if $file_sum > 0 }>
<table width="800px; " style="margin-left:36px; border:1px solid #090;">
<tr>
<td bgcolor="#006600">文件名</td><td bgcolor="#006600" >修改时间</td><td bgcolor="#006600" >文件大小</td>
</tr>
<{foreach from=$files item=item_init}>
<{foreach from=$item_init item=item}>
<tr><td><input type="checkbox" name="filenames[]" value="<{$item.file_name}>" />
<a href="<{$item.file_path}>" target="_blank"><{$item.file_name}></a></td>

<td><{$item.file_mtime}></td>
<td><{$item.file_size}></td>
</tr>
<{/foreach}>
<{/foreach}>
</table>
<{/if}>

<br />
<input type="submit" name="del" value="删除" style=" margin-left:40px;">
</form>
</div>
</body>
</html>